<template>
  <div class="app-container">
    <!-- 对话框(添加 / 修改) -->
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="申请人的用户编号" prop="userId">
          {{ form.userId }}
        </el-form-item>
        <el-form-item label="设备编号" prop="equipmentId">
          {{ form.equipmentId }}
        </el-form-item>
        <el-form-item label="保养标准编号" prop="standardId">
          {{ form.standardId }}
        </el-form-item>
      </el-form>
  </div>
</template>

<script>
import { getMaintainTask}  from "@/api/ems/maintainTask";
import {getDictDatas, DICT_TYPE} from '@/utils/dict'
export default {
  name: "LeaveDetail",
  components: {
  },
  data() {
    return {
      id: undefined, // 任务编号
      // 表单参数
      form: {},
    };
  },
  created() {
    this.id = this.$route.query.id;
    if (!this.id) {
      this.$message.error('未传递 id 参数，无法查看保养任务信息');
      return;
    }
    this.getDetail();
  },
  methods: {
    /** 获得任务信息 */
    getDetail() {
      getMaintainTask(this.id).then(response => {
        this.form = response.data;
      });
    },
  }
};
</script>
